/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Creditos;

import Ventas.CVenta;
import java.sql.SQLException;
import java.util.Vector;

/**
 *
 * @author alrojas
 */
public class CCredito {
    
    public static boolean agregar(Credito credito) throws ClassNotFoundException, SQLException{
        
        credito.setVenta(CVenta.dameUltimo());        
        return MCredito.agregar(credito);
    }
    
    public static Vector < Vector > dameCuotas(int codigo) throws SQLException, ClassNotFoundException{
        return MCredito.dameCuotas(codigo);
    }
    
    public static Vector< Vector< String > > dameTodo() throws SQLException, ClassNotFoundException{
        return MCredito.dameTodo();
    }
    
    public static void pagarCuotas(int codigo, Vector data) throws SQLException, ClassNotFoundException{
        MCredito.pagarCuotas(codigo,data);
    }
    
    public static Vector < String > dameInfo(int codigo) throws SQLException, ClassNotFoundException{
        return MCredito.dameInfo(codigo);
    }
    
}
